package com.aifund.admin.controller;
import com.aifund.admin.entity.form.charge.ChargePageForm;
import com.aifund.admin.entity.vo.PageResult;
import com.aifund.admin.service.ChargeService;
import com.aifund.common.entity.Charge;
import com.aifund.common.result.ResultBody;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/api/charge")
public class ChargeController {

    @Autowired
    ChargeService chargeService;

    @GetMapping("/chargeList")
    public PageResult<Charge> configList(ChargePageForm form){
        return chargeService.chargeList(form);
    }

    @PostMapping("/audit")
    public ResultBody audit(Long id,Integer status,String vertifyContext){
        chargeService.audit(id,status,vertifyContext);
        return ResultBody.success();
    }

}
